# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
pkgname=hexer-hobu
pkgver=1.4.0
pkgrel=10
pkgdesc="LAS and OGR hexagonal density and boundary surface generation"
arch=('loong64' 'x86_64')
url="https://github.com/hobu/hexer"
license=(LGPL)
depends=(gdal)
makedepends=(cmake)
source=("$pkgname-$pkgver.tar.gz::https://github.com/hobu/hexer/archive/${pkgver}.tar.gz"
        1c528390ec47588661c86e773dcef771787fc564.patch)
sha512sums=('4db94af7fe0a2cc3cd26202c4ec88fadd88408c92d14e11ac117af51ee267aa87cd82aa18b29867f318d272f644be60a826e7fb3c72908baba4124499f39579c'
            'a79efd591f97913e1e32a8dfc7dd7247203a0992196d9f095a16a8a110175190e527cf943d6329eafa65ec5dded88c283f017605368ee521fe28caba3802ccf8')

prepare() {
  cd hexer-${pkgver}

  patch -Np1 < "${srcdir}/1c528390ec47588661c86e773dcef771787fc564.patch"
}

build() {
  mkdir -p hexer-${pkgver}/build
  cd hexer-${pkgver}/build

  cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  make
}

package() {
  cd hexer-${pkgver}/build

  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et:
